<?php

namespace app\admin\validate;

use app\common\Validate;

class AttachmentValidate extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        "name" => ["require", "length" => '2,50']
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'name.require' => '名称必须',
        'name.length' => '名称必须2~50个字符',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [],
        'edit' => ['name'],
    ];
}
